package com.wei.service;

import com.wei.fallback.ProductServiceFallbackFactory;
import com.wei.pojo.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// 声明式需要调用的服务和服务熔断处理类
@FeignClient(value = "product-service", fallbackFactory = ProductServiceFallbackFactory.class)
public interface ProductService {

    @GetMapping("/product/{id}")
    Product selectProductById(@PathVariable("id") Integer id);

}
